package cn.rongdao.jrkabao.model.main.vip;

import com.mifengkong.frtools.http.request.HttpFunction;

import cn.rongdao.jrkabao.bean.main.vip.VipBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2018/1/29
 */

public class VipModel extends BaseKaMaoModel {

    public static VipModel getInstance() {
        return getPresent(VipModel.class);
    }

    public void execute(String id, Observer<VipBean> observer) {
        addParamStrings("pay_way","1");
        addParamStrings("vip_id", id);
        Observable<VipBean> observable = mServletApi.setOrderMessage(mParams).map(new HttpFunction<VipBean>());
        toSubscribe(observable, observer);
    }
}
